🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / discovery / src / commonMain / kotlin / org / meshtastic / feature / discovery / ScanTarget.kt
Displaying Raw • Download
feature/discovery/src/commonMain/kotlin/org/meshtastic/feature/discovery/ScanTarget.kt 2d20cd8a4708e2ef66e98d5259f3a97ec93f240a (2d20cd8a) Text, 2.33 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.discovery
Tff7b72import T7ee787okio.ByteString
Tff7b72import T7ee787org.meshtastic.core.model.ChannelOption
Tff7b72import T7ee787org.meshtastic.proto.ChannelSettings
Tff7b72import T7ee787org.meshtastic.proto.Config.LoRaConfig.RegionCode
T8b949e/**
* One entry in the discovery scan queue. A [channel] of `null` is a public-preset target (the original scan behavior —
* dwell on [preset] using the radio's existing primary channel). A non-null [channel] is a beacon-advertised custom
* channel: during its dwell the engine tunes the radio's primary channel to that name+PSK (and [region]) so nodes on
* that mesh are heard, then restores the original primary channel afterwards (Apple 014-mesh-beacons FR-005).
*
* @param label Result label persisted with the dwell (e.g. `"LONG_FAST"` or `"LONG_FAST · PartyNet"`), so a custom
* channel's results never collide with the same preset's public results.
*/
Tff7b72data Tff7b72class T56d364ScanTargetTb4b4b4(
Tff7b72val Te6edf3presetTb4b4b4: Te6edf3ChannelOptionTb4b4b4,
Tff7b72val Te6edf3labelTb4b4b4: Tffa657StringTb4b4b4,
Tff7b72val Te6edf3channelTb4b4b4: Te6edf3ChannelSettings? Tff7b72= Tff7b72nullTb4b4b4,
Tff7b72val Te6edf3regionTb4b4b4: Te6edf3RegionCode? Tff7b72= Tff7b72nullTb4b4b4,
Tb4b4b4)
T8b949e/**
* A distinct custom channel a beacon advertised, presented as a selectable row in scan setup (FR-007). Deduped by [id]
* (name + preset + PSK), since the same channel on the same preset is one row regardless of how many nodes beaconed it
* — but a different PSK is a different network, so it must not collapse into another row (that would send the user to
* the wrong mesh).
*/
Tff7b72data Tff7b72class T56d364BeaconChannelTb4b4b4(Tff7b72val Te6edf3nameTb4b4b4: Tffa657StringTb4b4b4, Tff7b72val Te6edf3pskTb4b4b4: Te6edf3ByteStringTb4b4b4, Tff7b72val Te6edf3presetTb4b4b4: Te6edf3ChannelOption?Tb4b4b4, Tff7b72val Te6edf3regionTb4b4b4: Te6edf3RegionCodeTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3idTb4b4b4: Tffa657String
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Ta5d6ff"Tffd700$Te6edf3nameTa5d6ff|Tffd700${Te6edf3presetTff7b72?.Te6edf3nameTb4b4b4.Te6edf3orEmptyTb4b4b4(Tb4b4b4)Tffd700}Ta5d6ff|Tffd700${Te6edf3pskTb4b4b4.Te6edf3hexTb4b4b4(Tb4b4b4)Tffd700}Ta5d6ff"
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s